<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Common\DefCtl;

final class DefDeviceNetCtl extends DefAbstract
{
    private const TABLE_NAME                = 'def_device_net';
    private const FIELD_ID                  = 'ddnt_id';
    private const FIELD_KEY                 = 'ddnt_key';
    private const FIELD_NAME                = 'ddnt_name';
    public const EXT_NAME                   = 'name';
    public const KEY_UNKNOWN                = 'unknown';    // 未知
    public const KEY_NONE                   = 'none';       // 无网络
    public const KEY_WIFI                   = 'wifi';       // WIFI
    public const KEY_WWAN                   = 'wwan';       // WWAN
    public const KEY_2G                     = '2g';         // 2G
    public const KEY_3G                     = '3g';         // 3G
    public const KEY_4G                     = '4g';         // 4G
    public const KEY_5G                     = '5g';         // 5G
    public const KEY_6G                     = '6g';         // 6G
    public const KEY_7G                     = '7g';         // 7G
    public const KEY_OTHER                  = 'other';      // other

    /**
     * @return static
     * tag
     */
    public static function tag():self
    {
        $fieldExtList   = [self::EXT_NAME => self::FIELD_NAME];
        return parent::tag()->config(self::TABLE_NAME, self::FIELD_ID, self::FIELD_KEY, $fieldExtList);
    }
}